package com.java.io;

import java.io.FileReader;
import java.io.IOException;

public class FileReaderTest {

	public static void main(String[] args) {	
		FileReader fr=null;
		
		try {
			fr=new FileReader(args[0]);
			System.out.println(fr.getEncoding());
			int i;
			while((i=fr.read())!=-1){
				System.out.print((char)i);
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally{
			try {
				fr.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

}
